home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-14 | 1.5 KB | 56 lines | [TEXT/MPS ] |
- /* _________________________________________________________________________________________________________ //
- Copyright © 1992-93 Apple Computer, Inc. All rights reserved.
- Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
- Programmer: Kent Sandvik
- Date: 12/21/92
- Revision comments are at the end of this file.
- ---
- TMenubar is a simple object that keeps track of the menubar
- TMenu.cp contains TMenubar member functions.
- _________________________________________________________________________________________________________ */
-
- // HEADER FILES
- #ifndef _MENU_
- #include "Menu.h"
- #endif
-
-
- // CONSTRUCTORS AND DESTRUCTORS
- #pragma segment Menu
- TMenubar::TMenubar(short ResourceID)
- // Constructor, create a visible menu bar.
- {
- Handle aMenubar = NULL;
-
- // Load the MBAR resource defined in the ID.
- aMenubar = ::GetNewMBar(ResourceID);
- ASSERT(aMenubar != NULL, "\pProblems loading in MBAR");
-
- if(aMenubar != NULL)
- {
- ::SetMenuBar(aMenubar); // install menus
- ::DisposHandle(aMenubar); // don't need it any longer
-
- ::AddResMenu(::GetMHandle(mApple), 'DRVR'); // add DA names to Apple menu
-
- ::DrawMenuBar(); // install the menu bar itself
- }
- }
-
-
- #pragma segment Menu
- TMenubar::~TMenubar()
- // Default destructor -- empty for the time being.
- {
- }
-
-
- // _________________________________________________________________________________________________________ //
-
-
- /* Change History (most recent last):
- No Init. Date Comment
- 1 khs 12/21/92 New file
- 2 khs 1/7/93 Cleanup
- */
-